<extend name="Base:base" />
<block name="title">{$title}</block>
<block name="content">

    <div class="cf">
       
        <!-- 高级搜索 -->
        <div class="search-form fr cf">
            <div class="sleft">
                <input type="text" name="name" class="search-input" value="{:I('name')}" placeholder="请输入菜单名称">
                <a class="sch-btn" href="javascript:;" id="search" url="__SELF__"><i class="btn-search"></i></a>
            </div>
        </div>
    </div>
    <div class="data-table table-striped">
        <form class="ids">
            <table>
                <thead>
                    <tr>
                        <th>序号</th>
                        <th>访客姓名</th>
                        <th>访客邮箱</th>
                        <th>咨询项目</th>
                        <th>留言信息</th>
                        <th>访问时间</th>
                        <th>是否回复</th>
                       
                        <th>操作</th>
                    </tr>
                </thead>
                <foreach name="data" item="visitor">
                    <tr>
                        <td>{$visitor.id}</td>
                        <td>{$visitor.name}</td>
                        <td>{$visitor.email}</td>
                        <td>{$visitor.subject}</td>
                        <td>{$visitor.message}</td>
                         <td>{$visitor.time|date="Y-m-d",###}</td>
                         <td>{$visitor['reply'] == 1?'是':"否"}</td>
                    <td>
                          <if condition="$visitor.reply eq 1">
                              <a >已回复|</a>
                              <else /> 
                              <a href="{:U('Admin/Visitor/setActive',array('id'=>$visitor['id'],'value'=>1))}">回复|</a>
                          </if>
                        <a href="{:U('Admin/Visitor/info',array('id'=>$visitor['id']))}">查看详情</a>
                 
                    </td>
                    </tr>
                </foreach>
            </table>
            </form>
            <div class="digg">{$page}</div>
    </div>
</block>
<block name="script">
    <script type="text/javascript">
            //导航高亮
            highlight_subnav('{:U('index')}');
        
    </script>
</block>
